Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Google style docstrings to HQQ files #2

Closed
wants to merge 1 commit into from

Conversation

yiliu30
Copy link
Owner

@yiliu30 yiliu30 commented Jul 19, 2024

Add Google style docstrings to all files under neural_compressor/torch/algorithms/weight_only/hqq.

  • __init__.py:

    • Add docstrings for HQQuantizer, HQQModuleConfig, and QTensorConfig classes.
  • bitpack.py:

    • Add docstrings for BitPack and Packer classes and their methods.
  • config.py:

    • Add docstrings for HQQGlobalOptions, QTensorConfig, and HQQModuleConfig classes.
  • core.py:

    • Add docstrings for HQQTensorHandle and HQQLinear classes and their methods.
  • optimizer.py:

    • Add docstrings for optimize_weights_proximal_legacy function.
  • qtensor.py:

    • Add docstrings for QTensor and QTensorMetaInfo classes and their methods.
  • quantizer.py:

    • Add docstrings for HQQuantizer class and its methods.
  • utility.py:

    • Add docstrings for is_divisible and dump_elapsed_time functions.
  • .azure-pipelines/scripts/codeScan/pydocstyle/scan_path.txt:

    • Add neural_compressor/torch/algorithms/weight_only/hqq to scan path.

For more details, open the Copilot Workspace session.

return W_q

# 4-bit
################################################
@staticmethod
def pack_4bit_u8(W_q): # uint8 > uint8/2
"""
Packs a 4-bit tensor to uint8.
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Start after """

@yiliu30 yiliu30 closed this Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant